package day0318.enum_;

import day0318.enum_.WeekDays;

/**
 * @Author Stringzhua
 * @Date 2024/3/18 14:41
 * description:设置枚举的取值
 * 编译器会自动校验取值范围
 * 进行数据类型的检验
 */
public class DaysSelect {
    public static void main(String[] args) {
        WeekDays day = WeekDays.SUN;
//        int day1=1;WeekDays.SAT;
        if (day == WeekDays.SUN || day == WeekDays.SAT) {
            System.out.println("是周末");
        } else {
            System.out.println("不是周末");
        }
        //通过get方法获取enum的值
        System.out.println(WeekDays.SAT.getDays());
    }
}
